﻿using ArtMath.Core.Data;
using ArtMath.Core.Helper;
using System;

namespace ArtMath.PointCollection
{
    [Serializable]
    public class PartialEllipse : Ellipse
    {
        public double Start, Sweep;
        public PartialEllipse()
        {

        }
        public PartialEllipse(PointD center, double rotate, double a, double b, double start, double sweep) : base(center, rotate, a, b)
        {
            Start = start;
            Sweep = sweep;
        }
        public override bool Contains(PointD pt)
        {
            return Utility.InSweepRange(Start, Sweep, Center.GetAngle(pt)) &&
                base.Contains(pt);
        }
    }
}
